#ifndef VERTIFY_H_
#define VERTIFY_H_

#include <config.h>

boolean isValid(int input){
  if(input < 0 || input > 255){
    return false;
  }
  return true;
}

boolean isValidMs(int input){
  if(input < 0 || input > 500){
    return false;
  }
  return true;
}

int checkDelinate(char* input, int length){
  
  // Check endpoints
  if(input[0] != STRING_STAR_POINT || input[length - 1] != STRING_END_POINT){
    Serial.println("ERROR:: In checkDelinate, invalid endpoints.");
    return -1;
  }

  // Check Delinate
  for(int i = 2; i < length - 1; i += 2){
    if(input[i] != STRING_DELINATOR){
      Serial.println("ERROR:: in checkDelinate, invalid delinate.");
      return -1;
    }
  }
  
  // Else good elinate
  return 0;
}
#endif
